/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.company.Logic;

import com.company.primitivies.Point2d;
import java.util.List;
import org.jfree.data.xy.XYSeries;

/**
 *
 * @author admin
 */
public class Converter {
    public static XYSeries convertToXYSeries(List<Point2d> points,String uniqName)
    {
        XYSeries result=new XYSeries(uniqName, false, true);
        for(Point2d point:points)
        {
            result.add(point.getX(),point.getY());
        }
        return result;
    }
    
}
